<div class="header">
  <back-Btn></back-Btn>
  进项发票
</div>
<div class="container finance">
  <div class="list f_sk">
    <div class="list-item icon_more required" ng-click="chooseProject()">
      <div class="item-label">项目名称</div>
      <div class="flow-content">{{ param.projectName }}</div>
    </div>
    <div class="list-item icon_more">
      <div class="item-label">合同类型</div>
      <div class="flow-content" style="padding-right:0">
        <select ng-model="param.contractType">
          <option value="">选择合同类型</option>
          <option value="Xm_ContractPurchase">采购合同</option>
          <option value="Xm_ContractRent">租赁合同</option>
          <option value="Xm_ContractSubpackage">分包合同</option>
          <option value="Xm_ContractOther">其他合同</option>
          <option value="Project_ContractApplySingle">工程合同</option>
        </select>
      </div>
    </div>
    <div class="list-item icon_more" ng-click="chooseContract()">
      <div class="item-label">合同编号</div>
      <div class="flow-content">
        {{ param.contractNo }}
      </div>
    </div>
    <div class="list-item icon_more" ng-click="chooseSupplier()">
      <div class="item-label">供应商</div>
      <div class="flow-content">
        {{ param.supplierNo }}
      </div>
    </div>
    <div class="list-item required">
      <div class="item-label">开票单位</div>
      <div class="flow-content">
        <input type="text" ng-model="param.makeInvoiceCompany" />
      </div>
    </div>
    <div class="list-item required icon_more">
      <div class="item-label">发票类型</div>
      <div class="flow-content" style="padding-right:0">
        <select ng-model="param.invoiceType" ng-options="item.value as item.key for item in payTypeList">
        </select>
      </div>
    </div>

    <div class="list-item required icon_more">
      <div class="item-label">发票税率</div>
      <div class="flow-content" style="padding-right:0">
        <select ng-model="param.taxRate" ng-options="item.value as item.key for item in rateList">
        </select>
      </div>
    </div>
    <div class="list-item required icon_more">
      <div class="item-label">电子发票</div>
      <div class="flow-content" style="padding-right:0">
        <select ng-model="param.electronic" ng-options="item.value as item.key for item in electronicList">
        </select>
      </div>
    </div>
    <div class="list-item">
      <div class="item-label">货物或服务名</div>
      <div class="flow-content">
        <input ng-model="param.goodsName"></textarea>
      </div>
    </div>

    <div class="list-item list-item-textarea">
      <div class="item-label">备注</div>
      <div class="flow-content">
        <textarea cols="30" rows="10" ng-model="param.remark"></textarea>
      </div>
    </div>
    <!-- 自定义字段 -->
    <div user-defined field-map="param.fieldMap" validation="validation" uid="param.uid"
      processid="param.processInstanceId"></div>
      <div class="list table-list">
        <div class="info-title">
          发票明细
          <span class="c-blue fr" ng-click="showCertificate()">添加</span>
        </div>
        <div class="table-item" ng-repeat="item in param.details">
          <div class="content" ng-class="{cur:$index==costindex}" ng-click="resetlist(0)" ng-swipe-left="swipe($index,0)"
            ng-swipe-right="swipe(-1,0)">
            <div class="list-item">
              <div class="item-label">发票编号</div>
              <div class="flow-content">
                {{ item.invoiceNo }}
              </div>
            </div>
            <div class="list-item">
              <div class="item-label">开票日期</div>
              <div class="flow-content">{{ item.openDate }}</div>
            </div>
            <div class="list-item">
              <div class="item-label">发票金额(不含税)</div>
              <div class="flow-content">{{ item.invoiceAmount|NBFmt }}</div>
            </div>
            <div class="list-item">
              <div class="item-label">发票税额</div>
              <div class="flow-content">{{ item.invoiceTaxAmount|NBFmt }}</div>
            </div>
            <div class="list-item">
              <div class="item-label">签收状态</div>
              <div class="flow-content">{{ item.signIn==0?"未签收":"已签收"}}</div>
            </div>
            <div class="list-item">
              <div class="item-label">报税状态</div>
              <div class="flow-content">{{ item.taxDeclare==0?"未报税":"已报税" }}</div>
            </div>
            <div class="list-item">
              <div class="item-label">备注</div>
              <div class="flow-content">{{ item.invoiceRemark }}</div>
            </div>
            <div class="file-upload" file-list file-data="item.invoiceAttachment"></div>
          </div>
          <div class="delete_icon icon_del" ng-click="deletedItem($index)"></div>
        </div>
      </div>
    <!-- 附件 -->
    <div class="file-upload" file-upload file-data="param.attachment"></div>

    <!-- 审查日志 -->
    <div log-list taskid="process_id"></div>
  </div>
</div>
<!-- 删除流程 -->
<div delete-flow uid="param.uid" id="{{ param.processInstanceId }}" submit="submit" validate="validate"></div>
<!-- 发票明细 -->
<div class="list tablestyle pickceritem" ng-show="showCerPicker">
  <div class="list-item f_sk">
    <div class="grid list-content icon_enter required">
      <div class="col-1-4">发票编号</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker.invoiceNo" />
      </div>
    </div>
    <div class="grid list-content icon_enter required">
      <div class="col-1-4">开票日期</div>
      <div class="col-3-4">
        <input type="text" date-directive ng-model="picker.openDate" datetype="datetime" class="c0" />
      </div>
    </div>
    <div class="grid list-content required">
      <div class="col-1-4">发票金额(不含税)</div>
      <div class="col-3-4">
        <input type="text" tel-directive ng-model="picker.invoiceAmount" />
      </div>
    </div>
    <div class="grid list-content required">
      <div class="col-1-4">发票税额</div>
      <div class="col-3-4">
        <input type="text" tel-directive ng-model="picker.invoiceTaxAmount" />
      </div>
    </div>
    <div class="grid list-content icon_enter required">
      <div class="col-1-4">签收状态</div>
      <div class="col-3-4">
        <select ng-model="picker.signIn">
          <option value="">选择签收状态</option>
          <option value="1">已签收</option>
          <option value="0">未签收</option>
        </select>
      </div>
    </div>
    <div class="grid list-content icon_enter required">
      <div class="col-1-4">报税状态</div>
      <div class="col-3-4">
        <select ng-model="picker.taxDeclare">
          <option value="">选择报税状态</option>
          <option value="1">已报税</option>
          <option value="0">未报税</option>
        </select>
      </div>
    </div>

    <div class="grid list-content">
      <div class="col-1-4">备注</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker.invoiceRemark" />
      </div>
    </div>
    <div class="file-upload" file-upload file-data="picker.invoiceAttachment" maxnum=1></div>
  </div>
  <div class="pickceritem-btn tc flex">
    <div class="cancel" ng-click="closePicker()">取消</div>
    <div class="confirm" ng-click="addCertificate()">确定</div>
  </div>
</div>